﻿@if (Version == "V5")
{
    <div class="carousel-indicators">
        @for (_i = 0; _i < Count; ++_i)
        {
            var index = _i;
            @if (_i != Active)
            {
                <button type="button" aria-label="Slide @(_i + 1)" @onclick="EventUtil.AsNonRenderingEventHandler(async () => { await ClickEvent(index);})" data-bs-target="bs" @onkeyup="@(e => { EventUtil.AsNonRenderingEventHandler(async () => {await PressEvent(e); }); })"></button>
            }
            else
            {
                <button type="button" class="active" aria-label="Slide @(_i + 1)" @onclick="EventUtil.AsNonRenderingEventHandler(async () => { await ClickEvent(index);})" data-bs-target="bs" @onkeyup="@(e => { EventUtil.AsNonRenderingEventHandler(async () => { await PressEvent(e); }); })"></button>
            }
        }
    </div>
}
else
{
    <ol class="carousel-indicators">
        @for (_i = 0; _i < Count; ++_i)
        {
            var index = _i;
            @if (_i != Active)
            {
                <li aria-label="Slide @(_i + 1)" @onclick="EventUtil.AsNonRenderingEventHandler(async () => { await ClickEvent(index);})" data-bs-target="bs" @onkeyup="@(e => { EventUtil.AsNonRenderingEventHandler(async () => {await PressEvent(e); }); })"></li>
            }
            else
            {
                <li class="active" aria-label="Slide @(_i + 1)" @onclick="EventUtil.AsNonRenderingEventHandler(async () => { await ClickEvent(index);})" data-bs-target="bs" @onkeyup="@(e => { EventUtil.AsNonRenderingEventHandler(async () => { await PressEvent(e); }); })"></li>
            }
        }
    </ol>
}